﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TeamNitro
{
    public partial class AdminHome : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
         
                DBManager db = (DBManager)Session["Admin"];
                lblName.Text = db.AdminName;
                lblDate.Text = DateTime.Now.ToShortDateString();
                lblTime.Text = DateTime.Now.ToShortTimeString();

                List<DBManager> StudentID = DBManager.GetUser("Student");
                List<DBManager> StaffID = DBManager.GetUser("Staff");
                List<DBManager> AdminID = DBManager.GetUser("Admin");

                lblAllUser.Text = (StudentID.Count + StaffID.Count + AdminID.Count).ToString();
                lblStudent.Text = StudentID.Count.ToString();
                lblStaff.Text = StaffID.Count.ToString();
                lblAdmin.Text = AdminID.Count.ToString();

                List<DBManager> CDS = DBManager.GetSubject("CDS");
                List<DBManager> Elective = DBManager.GetSubject("Elective");

                lblAllSubj.Text = (CDS.Count + Elective.Count).ToString();
                lblCDS.Text = CDS.Count.ToString();
                lblElective.Text = Elective.Count.ToString();
            
        }
    }
}